<#include "/common/head.ftl">
<@head>

<div class="container">
<form action="/api/user/changePasswd" method="post">
  <div class="form-group">
    <label for="exampleInputEmail1">旧密码</label>
    <input type="password" class="form-control" id="oldPasswd1" placeholder="旧密码"  name="oldPasswd" value="123123">
  </div>
  <div class="form-group">
    <label for="newPasswd1">新密码</label>
    <input type="password" class="form-control" id="newPasswd1" placeholder="新密码""   name="newPasswd" value="123123">
  </div>
  <div class="form-group">
    <label for="newPasswd2">确定密码</label>
    <input type="password" class="form-control" id="newPasswd2" placeholder="确定密码"  name="newPasswd2" value="123123">
  </div>
 
  <button type="submit" class="btn btn-default">修改密码</button>
</form>

 
</div>

    
<@js>
//-------



$("form").submit(function(e){
    e.preventDefault();
	$.post("/api/user/changePasswd", $("form").serialize(),function(data){
          console.log(data); //  2pm
         if(data.status==200){
			window.location.href='/';
         }
            alert(data.message);     
         }, "json");
    
});

          
          

</@js>

</@head>